<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'participacio-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Els camps amb <span class="required">*</span> són obligatoris.</p>

	<?php echo $form->errorSummary($model); ?>
    
    <?php
    if (!$noCodi) {
        echo '<div class="row">';
        /*
		echo $form->labelEx($model,'idEsdeveniment');
		echo $form->textField($model,'idEsdeveniment');
		echo $form->error($model,'idEsdeveniment');
        echo "</div>";
        */
        echo $form->labelEx($model,'idEsdeveniment');
        echo $form->dropDownList($model, 'idEsdeveniment',
            CHtml::listData(Esdeveniment::model()->findAll(array('order'=> 'nom')), 'idEsdeveniment', 'nomData'),
                array('prompt'=>'(Tria un esdeveniment)'));
        echo $form->error($model,'idEsdeveniment');
        echo "</div";
    }
    ?>

	<div class="row" style="float: left;">
        <?php /*
		<?php echo $form->labelEx($model,'idEsportista'); ?>
		<?php echo $form->textField($model,'idEsportista'); ?>
		<?php echo $form->error($model,'idEsportista'); ?>
         * 
         */
        ?>
        
        <?php echo $form->labelEx($model,'idEsportista'); ?>
        <?php echo $form->dropDownList($model, 'idEsportista',
            CHtml::listData(Esportista::model()->findAll(array('order'=> 'cognoms')), 'idEsportista', 'nomDataCodi'),
                array('prompt'=>'(Tria esportista)'));?>
        <?php echo $form->error($model,'idEsportista'); ?>
	</div>

	<div class="row" style="float: left; margin-left: 40px;">
        <? /*
		<?php echo $form->labelEx($model,'idFuncio'); ?>
		<?php echo $form->textField($model,'idFuncio'); ?>
		<?php echo $form->error($model,'idFuncio'); ?>
         * 
         */
        ?>
        
        <?php echo $form->labelEx($model,'idFuncio'); ?>
        <?php echo $form->dropDownList($model, 'idFuncio',
            CHtml::listData(Funcio::model()->findAll(array('order'=> 'nom')), 'idFuncio', 'nom'),
                array('prompt'=>'(Tria una funció)'));?>
        <?php echo $form->error($model,'idFuncio'); ?>
	</div>
    
    <div id="separador" style="clear:both;"></div>    

	<div class="row buttons">
        <?php $txtButo= ($noCodi ? "Afegir" : "Crear"); ?>
		<?php echo CHtml::submitButton($model->isNewRecord ? $txtButo : 'Guardar'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->